# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=py3-ecos
pkgver=2.0.10
pkgrel=0
pkgdesc="python interface for ECOS"
url="https://github.com/embotech/ecos-python"
arch="all"
license="GPL-3.0-only"
depends="py3-numpy py3-scipy ecos"
makedepends="py3-setuptools ecos-dev py3-numpy-dev"
checkdepends="py3-nose"
source="ecos-python-$pkgver.tar.gz::https://github.com/embotech/ecos-python/archive/refs/tags/v$pkgver.tar.gz
	use_external_ecos.patch
	"
builddir="$srcdir/ecos-python-$pkgver"
options="!check" # cannot get checks to pass

build() {
	make version
	python3 setup.py build
}

check() {
	python setup.py build_ext --inplace
	nosetests
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
2818c1b2de2d843c2ce1b1d88ce84832dd0aa229ca6b599bb055f80d10223451ffca84a1a145112d269bc9985203d617b1234d59419091b6588309662f28be77  ecos-python-2.0.10.tar.gz
671bea0c1eadf6fe67a632af6598bc1bc48fbe2ddbdc4439f6bcc52636a9a5b43e7f1c5b7a384a737088a16f69ca3835048b562eeb4c6894a52f381d759ec6c9  use_external_ecos.patch
"
